<template>
    <div class="human-ai">
        <el-button @click="createPolygonFence">创建电子围栏</el-button>
    </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import { getMyProjectManager } from "@/getMyProjectManager";
import { ESPolygonFence, } from "esobjs-xe2-plugin/dist-node/esobjs-xe2-plugin-main";
const myProjectManager = getMyProjectManager()


const createPolygonFence = () => {
    const fence = myProjectManager.createSceneObject(ESPolygonFence)
    if (!fence) return
    fence.points = [
        [
            114.04311085761417,
            38.067134553443005,
            281.27655713755615
        ],
        [
            114.0421683484488,
            38.06721236993398,
            281.292246360807
        ],
        [
            114.04220565198108,
            38.06744460055956,
            281.2766432933895
        ],
        [
            114.0431391257908,
            38.06738763599857,
            281.2766120393969
        ]
    ]
    fence.materialMode = "scanline" //scanline
    fence.height = 15
}




</script>
<style scoped></style>